package com.lihh;

import org.apache.zookeeper.KeeperException;

import java.io.IOException;

public class ClientDemo003 {
  public static void main(String[] args) throws IOException, InterruptedException, KeeperException {
    // 1. 进行zookeeper 连接
    ZkClientUtils.connect();
    
    // 2. 创建 节点
    String ipHost = "/192.168.56.19";
    ZkClientUtils.register(ipHost);
    
    // 3. 打印log
    System.out.println(ipHost + " 已经上报 zookeeper服务.");
    while (true) {
    }
  }
}
